package fileServer;

import server.SAInitTaskContext;

public class FileTaskContext extends SAInitTaskContext {

	/**
	 * this the task context information that is relevant to the specific server application
	 * in this case - a file server.		
	 */
	private static final long serialVersionUID = 9054367359671841682L;
	private Integer FileNumber;		// number of file the client is downloading
	private Integer BlockNumber;	// the block number that is currently being sent
	
	public FileTaskContext clone() throws CloneNotSupportedException{
		FileTaskContext cloned = (FileTaskContext) super.clone();
		cloned.setBlockNumber(BlockNumber);
		cloned.setFileNumber(FileNumber);
		return cloned;
	}
	
	public Integer getBlockNumber() {
		return BlockNumber;
	}
	
	public void setBlockNumber(Integer blockNumber) {
		BlockNumber = blockNumber;
	}
	
	public Integer getFileNumber() {
		return FileNumber;
	}
	
	public void setFileNumber(Integer fileNumber) {
		FileNumber = fileNumber;
	}
}
